/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SleepButton {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010070041';
    }

    get categoryName() {
        return '\u7761\u7720\u7ebd\u6263';
    }

    getBedOff(params) {
        return command({
            method: 'getBedOff',
            methodId: 'p1vZRvXV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHeartRate(params) {
        return command({
            method: 'getHeartRate',
            methodId: 'pUPQlyEZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRespiratoryRate(params) {
        return command({
            method: 'getRespiratoryRate',
            methodId: 'pZguni1L',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSleepStatus(params) {
        return command({
            method: 'getSleepStatus',
            methodId: 'pGoxIH3S',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'ppAXPj5d',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH3fOAr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SleepButton;
